<html>
<head><meta charset="utf-8"><title>Parse an isolated Path · t-compiler/rust-analyzer · Zulip Chat Archive</title></head>
<h2>Stream: <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/index.html">t-compiler/rust-analyzer</a></h2>
<h3>Topic: <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/Parse.20an.20isolated.20Path.html">Parse an isolated Path</a></h3>

<hr>

<base href="https://rust-lang.zulipchat.com">

<head><link href="https://rust-lang.github.io/zulip_archive/style.css" rel="stylesheet"></head>

<a name="202389520"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/Parse%20an%20isolated%20Path/near/202389520" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Zac Pullar-Strecker <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/Parse.20an.20isolated.20Path.html#202389520">(Jun 30 2020 at 02:34)</a>:</h4>
<p>As part of <a href="https://github.com/rust-analyzer/rust-analyzer/issues/503">#503</a> I need to parse an isolated <code>Path</code> from doc comments. <br>
What should the API look like, should it just be <code>Path::parse(src: &amp;str) -&gt; Self</code>? <br>
Alternatively should it be on <code>ModPath</code>, parsing names  then using <code>ModPath::from_segments</code>?</p>



<a name="202398550"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/Parse%20an%20isolated%20Path/near/202398550" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> David Lattimore <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/Parse.20an.20isolated.20Path.html#202398550">(Jun 30 2020 at 06:11)</a>:</h4>
<p>Do you mean for ast::Path or the HIR Path? If ast, I implemented a parse method in <a href="https://github.com/rust-analyzer/rust-analyzer/pull/4962">https://github.com/rust-analyzer/rust-analyzer/pull/4962</a></p>



<a name="202399071"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/Parse%20an%20isolated%20Path/near/202399071" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Zac Pullar-Strecker <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/Parse.20an.20isolated.20Path.html#202399071">(Jun 30 2020 at 06:21)</a>:</h4>
<p>Oh perfect! This is the second time I've asked for something and found someone implemented it recently. I guess I should watch the commit log more :).</p>



<hr><p>Last updated: Aug 07 2021 at 22:04 UTC</p>
</html>